import time
import unittest

import HTMLTestRunner_PY3

import app
from script.test_employee import TestEmployee
from script.test_employee_params import TestEmployeeParams
from script.test_login import TestLoginScript
from script.test_part import TestPart

suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestEmployee))
suite.addTest(unittest.makeSuite(TestLoginScript))
suite.addTest(unittest.makeSuite(TestEmployeeParams))
suite.addTest(unittest.makeSuite(TestPart))

with open(file=app.BASE_DIR + "/report/report{}.html".format(time.strftime("%Y%m%d-%H%M%S")), mode="wb") as f:
    runner = HTMLTestRunner_PY3.HTMLTestRunner(f)
    runner.run(suite)
print("--------------测试轮巡是否触发---------------")    